const createMap = (dict, def = '--') => {
	return (v) => {
		if (v in dict) {
			return dict[v];
		}
		console.warn('can not found %s in dict', v, dict);
		return def;
	};
};

// 提现审核 - 审核状态
export const USER_ACCOUNT_TYPES = {
	BANK_CARD: 1,
};
export const USER_ACCOUNT_TYPES_MAP = {
	[USER_ACCOUNT_TYPES.BANK_CARD]: '银行卡',
};
export const USER_ACCOUNT_TYPES_FUN = createMap(USER_ACCOUNT_TYPES_MAP);

// 账单 - 交易类型
export const BILL_TRANSACTION_TYPES = {
	CASH_WITHDRAWAL: 1,
	INCOME: 2,
}
export const BILL_TRANSACTION_TYPES_MAP = {
	[BILL_TRANSACTION_TYPES.CASH_WITHDRAWAL]: {
		text: '提现',
		type: '-',
	},
	[BILL_TRANSACTION_TYPES.INCOME]: {
		text: '入账',
		type: '+',
	},
}

export const BILL_TRANSACTION_TYPES_FUN = createMap(BILL_TRANSACTION_TYPES_MAP);
